fixed error when accessing fields via reflection