fixes to work on ubuntu