Fix input ending with "sc" overflowing callback length