Fixed bugs & added sleep for solr not to crash