Added code to make the pages reload