fix various small resource leaks