fix reading options