Fix class cast exception reported on OpenNTF