Fixed overlow bug in new input conditioning code