fix conversion to array

props to @mistydemeo for finding this one, fixes #233.