Fix zero offset exception