fix a bug when folder possibly be null