Fixed bug with letter encoding