Use host-casting instead of broken (char) casts