Made correction based on user problem

A user had a strange problem: plugin would not create the template and
there was some kind of infinite loop on login but he found a simple fix
that doesn't seem to have any side effect