to_array was returning NULL, which was bad mmkay