fix minor mistake in `adjustOffset`