Updated judge for global function.