fix API generator for top level Classes