fix unwind-protect calls