Fixed rules and added missing inputs