fix for FreeBSD