fixed flushing logic, mergesort halts 2 line diff