fix the error of "%s is not a field in class %s"