working on rulematching mutex bug