fixed a bad resource leak.

maybe.