Fixed MongoDB bug with wrong output format