fixes migration and templating