Fixes for device and live code