fix memory leak when opening sd web files