Fixed a crash with retrycount being undefined