fixed error in which create or edit can only be clicked on once