Fix NPE in "/magic clean".