some fixes (work-in-progress)