bugfix when looking for attribute on inherited class
adding tests to solve bug with attributes on inherited classes