fix setParams, cleanup