Fixed flatmap completion issue