fixes bad class adding behaviour