various fixes to make this work with actual hardware