don't allow invalid serializations