fixed isReachable bug