Changed the DB queries to lowercase