fix bug in glob check