Fix loop terminates earily bug
Merge pull request #1 from Parthas-Menethil/BugFix_OffsetRestPart

Fix loop terminates earily bug