fix some structure issues