clean up edit mode