Update APIs to work correctly with rules