fix problem with data starting before origin