Fix a bug.
Remove useless code.