Fixed bugs in lucene loader