fix some bugs with manual mode