fixed work mode bug