fix serialization of item refs