Fixed remove item function