fixed a couple of bugs in the driver return code