bad ref to primary key?