some fixes for new structure

This reverts commit 9414e0cf7b01169d9eee0c7718bb4f735cc32419.