Fixed a bug with serialization of null references