fix problems in pagination.php