[Patches] Bugfix, improved Debian/Ubuntu support