Better error messages when dealing with structs