fix calculating offset