Fixed the sync API change of glob