fix bug: when path is empty