Merge sort fix: Get it working for stdin