fixed when running with mysql offset