Fixed updating and deleting