[interface] Fixed a wrong cast bug in command dumps, thanks to @ohpe