fixed a tricky array conversion bug