Make tests work with sandboxes
Fix GC statistics overflow
Merge pull request #1755 from mattias-lundell/master

Make tests work with sandboxes and fix GC statistics overflow