Fix handling of numeric flags