still need to prune off the end of the buffer if we run into an invalid IE type