Fix a bunch of bugs in chat commands