Struct implementation - bug fixes