some minor adjustmenst for FreeBSD