fixed bad reference in validate_params