fix script pagination