fix for whitespaces in template