Bz/fix freebsd

Fix issues. Tested with freeBSD 9.2 and 10.
No addresses is only valid on success.