fix on-the-fly classname checking