Changes offset calculation to use offset() instead of position() 

Fixes #239. Please note that there is still some offset issues on the "Refine Query" button on the bottom of the filter  not caused by this update but related. I'll file a separate issue.