Don't infinite loop if offsetNum starts at 0
trim trailing whitespace and check for cb in wrap
Merge pull request #83 from ngoyal/master

Don't infinite loop if offsetNum starts at 0