Changed match on Some by flatMap