Fixed bug where last character would print twice.