Fixed bug with loading page