improved struct type correctness