fix some boneheadedness around edges