fix bug in motorSpeed function