fix built-in function scope bug