fixed a bug in the extraction of parameters