safeguard page int conversion