you have to merge edges also, not only vertices. or try to delete faces and then use "fill hole" one by one instead of extruding edges.