fixed integer divsion bug in manual control