Cross platform fixes