fixed weird create/edit bugs