Fixed a bug with clear and add range