bug fixes to be tested on pi