Add the missing global $g