Corrects double-rendering of main page