(bug) Fix issue where deletion from database crashes server
Merge pull request #102 from noodle/master

(bug) Fix issue where deletion from database crashes server