fixes #2571 Page statistics never finish to load

Fixed the issue and pushed code for review, please check it.