fix problem on some platforms