fix class loading issue with enumerations
fix possible npe in the mongo driver
minor