fixes from openbsd