fix extracting characters