Correct type with yield