Fixed a bug in UserInterfaceManager.