fixed the global issue