fixed some issues with the add class