fixed error in passing parameters