Fixed threading issue in SessionManager causing threads to lock on different locks, causing race conditions