Fix lock order prior to merge.

Closes #144.