avoid null reference error (win)