Fixed some parameter checking issues.