remove extra space from template