misc bug fixes

fix misc problems with driver