fixed freebsd errors