Correct in-place conversion. Fixes #1.