fix bug in init cam device. Need to fix bug in simcam.