Bugfix serialization failing with references