Fix error during edit