Fixing bug with valued options