fix NPE from scale method, improve apply runit