fix some problems with the thrust host/device vectors in the error checking.