fix for infinite timeout