Try and convert template to use \n instead of real linefeeds for better readability.