option handling fixes