Further fix for global scope issue