Fix nested optional objects bug