fix reading opts