fixed generate_SOA

* missuse of getattr()