adjust tests, fix option handling