Changed interface so that correct tag sequence can be returned as well.