Fixing global leak error.