Fix HW problems and test.