added safeguard for case-sensitive parameter names and trimming of parameter values