small untested fix to optional params