fix ordering in rules