Fixed non-existing references in field query