-fix variable
- functionality to handle the different entityreference field types