Fix digital output bugs.