more fixes and tests on balance filter matching