Fix driver dependent code