Fix bug that was introducing commas into the class list on actorTeardown

This fixes an issue where removing an actor was invalidating the element class attribute.