Fix linefeed issue in template