fixed the this.remove() bug in Safari and (maybe) Firefox