fixes edit mode