fix bug if origins not a list