some init and device connection fixes