Core: a weird bug fix in ClassHelper