fix bug on motor driver example code