fixed end of line parsing error in gensgd