some fixes from rework