Corrected manhattan distance