Distributed fixed problem with optimization with single node.

NOTE: This is a temporary patch waiting to fix it completely.