Fix regex issue, set cancelled when permission is denied (no more
unknown command error)