fixed setSpeed initialization bug