Rename keep_range to preserve_range, fix test cases