Fixed transpose and finds closest word