Some minor improvements to the command queue