fix bug about origin check