First changes to make it compatible with debian/ubuntu