fixing indexing of string when printing steps