small template bugfixes