Fixed uninitialized variables, Lucene OutOfMemoryException and negativ hitsPerPages