made it work for empty path (root installation)