Fix outputs being inverted all the time