compile fixes (work-in-progress)