Fix class reference parsing errors