Bugfixes relating to commands.