Accepted by CRAN, also fixed for Windows.