Fix section class calculation