Fixing unicode writing bug and the non unique context bug