Fiex two bugs of Put() and Remove().