Removed commented out code
Patch incoming sample length only when required