Bug Fix: Fixed bug where code tried to de-disperse past the end of the input