fix to get offset for waiting queries