tried to fix latest mongodb implementation
fix for latest mongodb bug