prevent addition of empty classes