fix to haveInDatabase() issue