Fixed timeout logic.