Fix bug in parseParams

Related issue: #146