task pause bug resolved. running variable in Task.resume() settrue  only if false