correcting failed pagination