added some offsets from #8e1a4568 by @Sirais