Fix inserting, updating, and deleting methods