fixing the bug for timeouts