prevents #2156

Corrected code that assumes there are object fields present.