where clause fix