Fix class loader issue with deserialization