Fix a bug, add debug code for myself