Ported from Rust v0.7 to Rust v0.8, and fixed a bug on empty command.