Using toArray to get around IE