Fixed null pointer in downloadIndexThread