Make flag variables int instead of char. This avoids getting into trouble on systems...