(bug) Fix issue where deletion from database crashes server

This was the cause of the database crash during our presentation.  It's working perfectly now with this edit.