Fixed random freeze with 'timeout value is negative'.