Fix incorrect conversion to array