Fixed buttons which were still active when not in edit mode.