added auto mode
fixed automode on other modes