Webpage rendering finally working properly