model and structure fixes