core: fix parsing of generic signature with inner classes
core: fix class cast exception