fixed call to getattr to quote the attribute name