Fix exception - unknown primary key for table sessions (fix)