fix the template code showing on load