Solved bug at matrix sliding window