Bugfix to cleaning of inputs.