Fix potential use-after-move bug.

Closes #38.