[BUGFIX] Fixed if span or offset is 0.