fixed issue with filtered record array's length getting incremented when replacing records.