Fixes for misaligned matches