Fixed UUID generation issue with timestamps.

Fixed tests for shard allocation.