bugfix for *bsd