patch for end string decoder