fix class constant lookup issues