fix bug in constructParameters