fixed bug with addWhere