bugfix when trying to edit