making sure no dirty html is displayed on loading