fixes some issues with the restructuring