modify timeout detection