Raise if display number could not be parsed.
Fix deprecation warnings.