fixed bugs related to resetting the parameters