restore origin to check