Survive orientation change and fix NPE.