Fixed deactivation bug if details has pending changes.