Fix for BSD compat