revert commenting out the origin check