Database fix for notifications