Had hardcoded origin - this is now taken from opts