This was causing the UI to be created twice.