call scope bug fix