Fixes bug in extracting samples where chain thinning was ignored

Closes #102