fix column switch code (column was always zero)