fix bugs in spotlight plugin throwing npe and concurrentaccess exeption