Attempts to fix NPE.