fixed mongodb bug