subgradient optimization - bugfixes