fix rules and json