fix extracting variable.