Bug fixes in optimization notebook