fix NPE with UI init