fix major bug when running cli command too quickly after running daemon mode