fixing empty spaces in steps array