Added an optimization to align_ungapped