fixed an error with path name ending with \