Fixed bug with unexpected return value of glob()