Fix for searching in DB