Fix C string to slice conversion