fixed bug in setOptions