fix option handling