fixed error return value in setOption