urgent bug fix to LP optimization