Fix error handling

I'd forgotten to convert arguments into an array. Oops.