bugs fixed. A bug about wrong command name and one about wrong index for regex match result.