fix a bug in folder creation