fixed bug which changed all params starting with matching string, instead of params that match exactly
fixed bug a cleaner way