fix removing index entry on primary key

Fix for #123