Added handling of errors from update