fix NPE after activity restore