Optimization debugging problem