minor resource leak fixed