Fixed token generation issue on Windows