more cross-platform fixes