Fixed bug in edit mode button