Fix getType() when parsing commands