Fix MySQL row skipping