Make sure we're operating on the buffer which has the marker

Fixes issue #1
Merge pull request #2 from mrvdb/master

Make sure we're operating on the buffer which has the marker