fill bad slope values with surrounding values