Fix BSD stuff