broken iterator casting