Clean up type errors for subranges