Fixed a critical bug in the parameter validation