correct in-place conversion bug