pagination bugs fix