Fixed crash when opening new UI.