Fixing motor direction issues