fix issue of negative values