check if field is primary key is indexed before deleting index

fix for #129