Fixes class, row calculation