Add extra check for undefined bug on windows see #30