fix for empty where clause