added an if statement to stop the bad values from the poor wiring job