as_bytes() does not include the null terminator. This seems like a problem.