Format lock opts with the lock

This is a simpler solution to the problem outlines on issue #1879