device bugfixes