TSAGE: Fix handle leak in resource manager