fix use of getattr