Problems with foreach and ArrayList