fix extracting character