Put in more robust code for characters