fix previous incomplete restructure