fix a bug in cdriver.cpp