Small fixes for unittests, removed problem with dispersy accessing a
lock