fixed tests + merge typo in ReferenceField