Bug fix in case of trivial (one node) problem