fixed minor bugs with parameter