Fixed a problem with passing and checking parameters