fix error when container parameter is omitted but opts is given