pagination detection fixed