fixes to work on real hardware