Fix bug on test and optional params