Fixing row calculation for action button.