fix offset issue, closes #24