added group name in front of template select and fixed getCollums for single line not followed by new line