Fixed rules and tests