fix EMX decoding