Fixed issue with negative weight.