fixes bugs in thrash input