fix global leak for browser