Fixing bug from device valid or not