Fix printable characters not working

Resubmission of #1606