some bugfixes to work on device