Fix several issues in character echo