finish edit mode