fix bug in where clause base controller