refine option value handling