Fix - check if batch['hits'] isn't nil
Merge branch 'fix-nil-hits'