Fixed an error message when table does not have a primary key.