Fixed bug around optional params