added a lock per session.