fix static scope issue