Fixed a bug when getting a non-exist parent folder.