Make small fix with parameter checking