Fix an exception in command_complete()

Signed-off-by: Guillermo Ontanon <guillermo@midokura.jp>