Fix Bug with nested classes