[UI][CORE] Fixed behavior when selecting empty directory