fix windows warning and error, display 0 for uninitilized value.