corrected some problems with mongo conversion

Signed-off-by: naazgull <pedro.figueiredo@gmail.com>