fixed mongo bug