fix assert in anonymou classes