Fixed typo and missing function parameters to genFlatworld()