algorithm: fix transposition and match window counting