Fixed error #265
Also changed WHERE clause in setParams