Debugged merge sort. Now it's working