Fix timeout behavior