Fixed code overflows on Windows