Fixing a bug when creating folder