Fixes the way errors are generated when deleting and updating.