Fixed wild pointer in UI.h, which caused crashes