Potential fix for locked database when using !seen