Random period fix in serialization tests