fixed #2497 : setSearchPaths Bug