Clean multiple types and codepath causing subtle bugs