Fixed some problems with generics handling and Cursor object hierarchy.