Fixes bugs in serverside handling of invalid commands.