fixed remove() bug