Fixed handling of trigger encoding.