Fix issue with negative numbers