Fixes for match checking