fixing problem when unexisting ds at the input.