Fixed incorrect variable issue
variable extraction