New code to make sure origin is only updated ONCE per script run.