Fixed last minute change of optional parameter coming before required parameter
(cherry picked from commit efde7baaa526ccff774f802b1c3f7ca89dbd254a)