Struct implementation bug fixes