bugfix: properly delete records from database

The key has not been properly mapped.