fixed #656. Templates work properly when watching.