Clean resource leak in Refractor.