Fixed escaping issues that caused shell input to overwrite itself on the second line