Fix calcs for negative values