Serialization fix

Fix for the Deserializing objects which came from a different assembly
Thanks to Banksy for this fix :)