fixed crash under Windows