Fixed a bug for detecting bad windows after Needleman-Wunsch alignment