fixed issue with primary keys and table pk name