Fixed bug with negative values