Fix learned command query