Fix bug in fetch_optionals