fixed a bug with parameter-parsing + several minor changes