Revert "Improve logic."

This reverts commit b71f19b21b35e475f161569f7fd426a4a9591230.