3.0 matching fixes

Fixes #5463