fix warnings in templates