Removed the erroneous issues from removeRange and removeAllRanges.