bug fix, windows compatible