Linux fixes (work-in-progress)