Fix removal not working because wrong variable was used.