bug fix
conditional steps added