Address issue #118.
Fixed compiler warning.
Merge pull request #153 from simongog/faster_extract

Address issue #118.