attemp to fix global leak error