Fix issue when loading modal rules many times