Fixed a logical bug in CutStock.cpp