Fixed a UI deprecation warning.