fixed errors in getattr