Fixed some obscure cases that input compliment optimization was breaking