Fixed problem with InsertTemplate tags that are not on the beginning of the line.