Fixed bug in lowercased table names in filter function