directory create: fix a bug