Fixes #4 SQL error when auto-deleting favorites