added parameters.clear to prevent errors