Fixed bug when you visit pages that dont have a query string