fix for orphaned transactions