[BUGFIX] Fix serialization of FileReference objects