Fix some issues with the new edit menu code