Removed stupid error which meant final residue was beging ignored