Fix bug in for comprehensions