fix for bug #536
Merge pull request #660 from ianbjorndilling/bugfix-536

Custom deletion hook error messages: issue #536