fix setcode