main page pagination fix