Fixed NullPointerException that may happen on timeout
Merge pull request #902 from johanhaleby/master

Fixed NullPointerException that may happen on timeout