initial page change bug fixing