Fixed bug when switching on work mode