Some platform fixes