fix where clause