fix bug with option generation