Fixed a rare bug when study name is the same as folder name