locking a container is not perfect, but works for now