Fix invalid memory access in conversion constructor