Fixes made, assuming that we use BSD.