flatMap fix
Remove foldState