fix error in destructuring of options