small fixes to support patches on Debian