fix unreference exception var warnings