Make sure types are preserved correctly.