fix ready event for restored pages