fix option reading