Fixing old template system