Trying to fix DTW