Fixed rules and scanning issues