We answer affirmatively a question of Srinivas-Trivedi (J Algebra 186(1):1-19, 1996): in a Noetherian local ring (R, m), if f(1),..., f(r) is a filter-regular sequence and J is an ideal such that (f(1),..., f(r)) + J is m-primary, then there exists N > 0 such that for any epsilon(1),..., epsilon(r) is an element of m(N), we have an equality of Hilbert functions: H(J, R/(f(1),..., f(r)))(n) = H(J, R/(f(1) + epsilon(1),..., f(r) + epsilon(r)))(n) for all n >= 0. We also prove that the dimension of the non Cohen-Macaulay locus does not increase under small perturbations, generalizing another result of [20].