fix check_timeout some more