fix Device::clear issue