Basic cross-platform fixes
Moar drastic fixes