Fixing origin check bug.