fix a bug: the last strings of the alignment sometimes were unexpected