Fixes

Some smallish fixes, found while rebasing linux-support