Fix last ResourceWarning and remove __del__ workaround