Fixed memset setting too many bytes when ranges are not a multiple of the merge_range