fixed error with reflection