Fix signature flatMap