Fix bug with empty path