Fixed selection bug for Edges and menu item not closing properly.