Resolved issue #8

Adding code to detect parameters correctly