Fixes for DeviceAttribute comparision in rules and is number checks