Fix error with nil yield