Fix bad read from types and domains