Fixed mongo issues