Fix a bug with query params on devices.