Modification start at position

remain a bug in calculate the position
Add reset stream logic and test