fixed a bug in local var scope for StatementList