small bugfixes to the templates