Added onBeforeStep