fix the removing the correct item problem