fix for multi-pages & php 5.2