Change lock pointer to reference

Eliminates panics seen while running the docker container: https://gist.github.com/pweil-/7d258d12db67ae2129b3