fixed console crash on vs2013