diff --git a/src/core/CLucene/index/IndexFileDeleter.cpp b/src/core/CLucene/index/IndexFileDeleter.cpp
index bea740b..14424cc 100644
--- a/src/core/CLucene/index/IndexFileDeleter.cpp
+++ b/src/core/CLucene/index/IndexFileDeleter.cpp
@@ -90,7 +90,7 @@ void IndexFileDeleter::setInfoStream(std::ostream* infoStream) {
 }
 
 void IndexFileDeleter::message(string message) {
-	(*infoStream) << string("IFD [") << Misc::toString( (int32_t)(_LUCENE_CURRTHREADID) ) << string("]: ") << message << string("\n");
+	(*infoStream) << string("IFD [") << Misc::toString( _LUCENE_CURRTHREADID ) << string("]: ") << message << string("\n");
 }
 
 
diff --git a/src/core/CLucene/index/IndexWriter.cpp b/src/core/CLucene/index/IndexWriter.cpp
index bdf6f84..56411f9 100644
--- a/src/core/CLucene/index/IndexWriter.cpp
+++ b/src/core/CLucene/index/IndexWriter.cpp
@@ -98,7 +98,7 @@ void IndexWriter::ensureOpen()   {
 void IndexWriter::message(string message) {
   if (infoStream != NULL){
     (*infoStream) << string("IW ") << Misc::toString(messageID) << string(" [")
-    						  << Misc::toString( (int32_t)(_LUCENE_CURRTHREADID) ) << string("]: ") << message << string("\n");
+    						  << Misc::toString( _LUCENE_CURRTHREADID ) << string("]: ") << message << string("\n");
   }
 }
 
@@ -1169,7 +1169,7 @@ void IndexWriter::addIndexes(CL_NS(util)::ArrayBase<CL_NS(store)::Directory*>& d
     try {
 
       { SCOPED_LOCK_MUTEX(this->THIS_LOCK)
-        for (int32_t i = 0; i< dirs.length; i++) {
+        for (size_t i = 0; i< dirs.length; i++) {
           SegmentInfos sis;	  // read infos from dir
           sis.read(dirs[i]);
           segmentInfos->insert(&sis,true);	  // add each info
@@ -1219,7 +1219,7 @@ void IndexWriter::addIndexesNoOptimize(CL_NS(util)::ArrayBase<CL_NS(store)::Dire
     try {
 
       { SCOPED_LOCK_MUTEX(this->THIS_LOCK)
-        for (int32_t i = 0; i< dirs.length; i++) {
+        for (size_t i = 0; i< dirs.length; i++) {
           if (directory == dirs[i]) {
             // cannot add this index: segments may be deleted in merge before added
             _CLTHROWA(CL_ERR_IllegalArgument,"Cannot add this index to itself");
diff --git a/src/shared/CLucene/util/Misc.cpp b/src/shared/CLucene/util/Misc.cpp
index 64b511a..98e1913 100644
--- a/src/shared/CLucene/util/Misc.cpp
+++ b/src/shared/CLucene/util/Misc.cpp
@@ -445,6 +445,11 @@ std::string Misc::toString(const int64_t value){
   STRCPY_TtoA(buf,tbuf,20);
   return buf;
 }
+std::string Misc::toString(const uint64_t value){
+  char buf[20];
+  _snprintf(buf,20,"%lu",value);
+  return buf;
+}
 std::string Misc::toString(const float_t value){
   char buf[20];
   _snprintf(buf,20,"%0.2f",(double)value);
diff --git a/src/shared/CLucene/util/Misc.h b/src/shared/CLucene/util/Misc.h
index ef98cb0..f5f48b6 100644
--- a/src/shared/CLucene/util/Misc.h
+++ b/src/shared/CLucene/util/Misc.h
@@ -57,6 +57,7 @@ CL_NS_DEF(util)
 
   static std::string toString(const int32_t value);
   static std::string toString(const int64_t value);
+  static std::string toString(const uint64_t value);
   static std::string toString(const bool value);
   static std::string toString(const float_t value);
   static std::string toString(const TCHAR* s, int32_t len=-1);
