[backend] stupid bug with Lock object and context manager