Fixed bug causing template tags to fail