Fixes to make new code work with actual device