bug fix at nested class handling