fixed algorithm to compute hash in FrozenMap and added tests