timeout and detection fix