[BUGFIX] Correct automatic grid column calculation for forms