fixed a bug in code management