Fixes for templating