sorta ugly fix for template variable propagation