bugfix offsets

needs some unit-testing.. coming soon