various fixes to make the library compile