Fixed bug where only first instance of class was being removed.