Fixed checking of correct paramteres number