fixed bugs: optparams were incorrectly filled