bugfix to flatfile-to-json changes in 7e67dfcdc3be06529e6a5f901f049f9a95bdbd98