Fix chat commands, fix a few bugs