fix class name on inheritance. add test. fixes #10