Bugfix - analyze now also resets globals