fixed detection of parameters