Fixed a few issues for deploy (pathnames on templates)