Added try/catch around native addRange() call for IE