fix template manager not being a singleton