fix update and delete