fix #21863: Print command causes crash