fix NPE on dispose