Fixed bug with wrong order of parameter initialization