Fix an error with accessing class property in reflection