avoid extra blank lines in template for custom sources