Param scope bug fixed