Why the cast? It should be array in all cases, should it not?