fixed isrunning bug