Impoved option group handling