fix opts bug