prevent hanging on WIndows