correct_negative_vals function

Correct negative values