SM: fix NPE