fix the command buffer