Fixed empty where clause