fixing BSON error reporting