fixed all for BSD