Could you just use an array cast here instead?