Added changes by Serjinis
Merge pull request #9 from nickskull/master

Fixes #8
Fixes problems with offline reporting and cache being nil.