Fixed bug that shows an error message after clearing parameters.

Closes #151