fix a bug about code input