fix for OSX rtti bug