minor bug fixes to test on Pi