this fixes the offset bug