fixed for freebsd