fixed erros on mongo side