pull over brandmart's fix for mongo's lack of after_commit