Fix driver dependent code
Merge pull request #2 from Jack3113/patch-2

Fix driver dependent code