Fixed issue with serializing a sleeping reference.