bug fixed never to switch as running if it has delay time.