fix the wrong output of flattenMap
Merge pull request #593 from limboy/2.0-development

fix the wrong output of flattenMap