fixed potential NPE in step method