fix hmm bug: trailing gaps are misssing from the query alignment