Fixed functionality to the removebutton.