some fixes with offset