fixed setOptions method