change ready to pageinit