Fixes to work on Debian