fix lock scope

lock can take 0 arguments, defaulting to true