fix updating and deleting