fix bugs in vip_rule and hw_layers