fixes negatives

Negative values return 0 instead